Skip to content

Conversation

@Jadowacu1
Copy link
Contributor

@Jadowacu1 Jadowacu1 commented Dec 6, 2024

Title: Improve Validation for the Program Creation

Description:

This PR updates the validation schema for input field in the program schema. Previously, input field used a restrictive regex pattern (/^[\p{L}\p{N}\p{P}\p{Z}]+$/u), which caused validation issues for certain inputs, such as those containing special characters, newlines, or unrecognized Unicode characters.

The changes in this PR relax the validation for input field by:

Allowing any string, including special characters and newlines, using the regex /^[\s\S]*$/.
Ensuring that input field remains required.

Changes Made:

Modified the input field validation in programSchema.
Updated the regex to support a broader range of input characters.

Impact of Changes:

Input field will now accept inputs with special characters, newlines, and other valid text formats.

How this have been tested

  • open the app vis preview link
  • login as superAdmin by username: [email protected] password: password123
  • navigate to program
  • Create program by using any text description

@vercel
Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atlp-devpulse-fn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2024 8:16am

@Jadowacu1 Jadowacu1 force-pushed the fix-program-creation-validation branch from a1b176a to baabec4 Compare December 8, 2024 08:12
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit baabec4 and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DREAM DREAM TEAM Ready For Review Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants